﻿<%@ WebHandler Language="C#" Class="compress" %>

using System;
using System.Web;

public class compress : IHttpHandler
{

    public void ProcessRequest(HttpContext context)
    {
        context.Response.AddHeader("Expires", "Thu, 01 Dec 2014 16:00:00 GMT"); // put here another date, if you want
        context.Response.ContentType = "text/css";
        context.Response.WriteFile(context.Server.MapPath("~/" + context.Request["id"]));// very important that id points to right relative path from root of website
    }
    public bool IsReusable
    {
        get
        {
            return false;
        }
    }
}
